3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next

About Storage Objects

A storage object is a type of QuickDraw 3D object that you can use to represent a physical piece of storage in a computer. The piece of storage can be any data that is accessible in a linear, stream-based manner. QuickDraw 3D currently supports three basic types of data storage formats: data stored in memory, data stored in the data fork of a Macintosh file, and data stored in files accessed through the C programming language standard I/O library. QuickDraw 3D represents these data storage devices as storage objects.

To read data from (or write data to) a data storage device, you first need to create a storage object of the appropriate type. For example, to read data from a Macintosh file, you can create a Macintosh storage object. You also need to create a file object (of type TQ3FileObject ) and attach the file object to the storage object. Once you've created a storage object and a file object and attached them to one another, you can then read data from the file object by using file object reading calls. See the chapter "File Objects" for information on creating file objects, attaching them to storage objects, and reading or writing data using those file objects.

QuickDraw 3D distinguishes between storage objects and file objects primarily so that you can read and write stored data using a single set of functions. QuickDraw 3D supports only one class of file object, instances of which can be attached to any of the types of storage objects that it supports.

A storage object is of type TQ3StorageObject , which is a type of shared object. QuickDraw 3D provides three subclasses of the TQ3StorageObject type:

UNIX storage objects and UNIX path name storage objects can be used to represent any object accessible through the standard I/O library on any operating system. The names, which can therefore be confusing, derive from the origin of the standard I/O library on the UNIX operating system.

For a description of pointers and handles, see the book Inside Macintosh: Memory. For a description of the Macintosh file-specification methods (that is, file reference numbers and file system specification structures), see the book Inside Macintosh: Files. For a description of the standard I/O library, see the documentation for any UNIX-based computer (for example, A/UX Essentials from Apple Computer, Inc., or The UNIX Programming Environment by Kernighan and Pike), or any book devoted specifically to C language programming (for example, The C Programming Language by Kernighan and Ritchie).


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next